﻿@using EM.OA.WebCommon.Extension
@model EM.OA.Portal.Models.AttachmentModels
@{
    Layout = "~/Views/Shared/_LayoutContent.cshtml";
}
<script type="text/javascript">
    function CheckFile() {
        var upfile = document.getElementsByName('TX_UploadFile');
        if ((upfile[0].value == null) || (upfile[0].value == '')) {
            alert("请选择文件后再进行上传");
            return false;
        }
        else {
            return true;
        }
    }
</script>
<script type="text/javascript" src="~/Scripts/page/Common/Attachment.js"></script>
@using (Html.BeginForm("", "Attachment", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    <input type="hidden" id="refID" name="refID" value="@ViewData["refID"].ToString()" />
    <div style="width:100%">
        @*@if (ViewData["type"] != null && ViewData["type"].ToString() != "Readonly")
        {
            *@<table width="90%" border="0" cellpadding="0" cellspacing="0" class="listtable2">
                <tr>
                    <td>选择文件：
                    </td>
                    <td>
                        <input id="TX_UploadFile" name="TX_UploadFile" type="file" class="input" size="30" />
                        <input id="BT_UploadFile" name="BT_UploadFile" type="submit" class="redbutton1" value="上传"
                            onclick="return CheckFile();" /></td>
                </tr>
            </table>
        @*  }*@

        @*list*@
        <table id="list" class="easyui-datagrid" toolbar="#toolbar">
        </table>
        <div id="toolbar">
            <a href="#" class="easyui-linkbutton" plain="true" onclick="download()" id="downloadFile">下载</a>
            <a href="#" class="easyui-linkbutton" plain="true" onclick="del()">删除</a>
        </div>
    </div>
}

